<include file="public@header"/>
</head>
<body>
<div class="wrap js-check-wrap">
    <ul class="nav nav-tabs">
        <li class="active"><a href="{:url('AdminGoodSpec/index')}">商品规格列表</a></li>
        <li><a href="{:url('AdminGoodSpec/add')}">添加商品规格</a></li>
    </ul>
    <form class="well form-inline margin-top-20" method="post" action="{:url('AdminGoodSpec/index')}">
        分类:
        <select class="form-control" name="type_id" style="width: 140px;">
            <option value='0' <if condition="$type_id eq 0">selected</if>>全部</option>
            <foreach name="type" item="ty">
                <option value="{$ty['id']}" <if condition="$type_id eq $ty['id']">selected</if>>{$ty['name']}</option>
            </foreach>
        </select> &nbsp;&nbsp;
        规格名称:
        <input type="text" class="form-control" name="spec_name" style="width: 200px;"
               value="{$spec_name|default=''}" placeholder="请输入规格名称">

        <input type="submit" class="btn btn-primary" value="搜索"/>
        <a class="btn btn-danger" href="{:url('AdminGoodSpec/index')}">清空</a>
    </form>
    <form class="js-ajax-form" action="" method="post">
        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="50">ID</th>
                <th>规格名称</th>
                <th>所属类型</th>
                <th>可选规格</th>
                <th >操作</th>
            </tr>
            </thead>
            <notempty name="data">
                <foreach name="data" item="vo">
                    <tr>
                        <td>
                            <input type="checkbox" class="js-check" data-yid="js-check-y" data-xid="js-check-x" name="ids[]"
                                   value="{$vo.id}" title="ID:{$vo.id}">
                        </td>
                        <td><b>{$vo.id}</b></td>
                        <td>{$vo.spec_name}</td>
                        <td>{$vo.name}</td>
                        <td>{$vo.items}</td>
                        <td>
                            <a href="{:url('AdminGoodSpec/edit',array('id'=>$vo['id']))}">{:lang('EDIT')}</a>
                            <a href="{:url('AdminGoodSpec/delete',array('id'=>$vo['id']))}" class="js-ajax-delete">{:lang('DELETE')}</a>
                        </td>
                    </tr>
                </foreach>
            </notempty>

            <tfoot>
            <tr>
                <th width="15">
                    <label>
                        <input type="checkbox" class="js-check-all" data-direction="x" data-checklist="js-check-x">
                    </label>
                </th>
                <th width="50">ID</th>
                <th>规格名称</th>
                <th>所属类型</th>
                <th>可选规格</th>
                <th >操作</th>
            </tr>
            </tfoot>
        </table>
        <ul class="pagination">{$page|default=''}</ul>
    </form>
</div>
<script src="__STATIC__/js/admin.js"></script>
<script>
    function reloadPage(win) {
        win.location.reload();
    }

</script>
</body>
</html>